//
//  ViewController.m
//  ZWSMShareDemo
//
//  Created by InitialC on 2017/10/19.
//  Copyright © 2017年 InitialC. All rights reserved.
//

#import "ViewController.h"
#import <LoginForThirdManger.h>
#import <SVProgressHUD.h>

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSDictionary *appKeyDict = @{
                                 @"wxKey":@"",
                                 @"wxSecret":@"",
                                 @"wbID":@"",
                                 @"wbSecret":@"",
                                 @"wbRedirectURL":@"",
                                 @"qqKey":@"",
                                 @"qqSecret":@""
                                 };
    [LoginForThirdManger initialSMShare:appKeyDict];
    // Do any additional setup after loading the view, typically from a nib.
}
- (IBAction)testURL:(UIButton *)sender {
    [LoginForThirdManger betaVerification:@"擦擦擦" testURL:@"***" completion:^(BOOL isVerifiability, NSError *error) {
        NSLog(@"是否==%d", isVerifiability);
    }];
}
- (IBAction)getVerificationCode:(UIButton *)sender {
    NSDictionary *dict = @{@"phone" : @"1*********3",
                           @"zone" : @"86",
                           };
    [LoginForThirdManger getVerificationCodeByMethod:SMSGetCodeMethodSMS withPhoneInformation:dict withBlock:^(NSError *error) {
        if (error == nil) {
            
        } else {
            NSLog(@"获取验证码时发生未知错误: %@", error);
            [SVProgressHUD setMinimumDismissTimeInterval:2.0];
            if (error.code == 477) {
                [SVProgressHUD showErrorWithStatus:@"当前手机号当天短信验证已超限"];
            } else {
                [SVProgressHUD showErrorWithStatus:@"获取验证码时发生未知错误"];
            }
        }
    }];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
